<?php
/**
 * @author		João Batista Neto
 * @package		rpo
 * @subpackage	http\exception
 * @category	Http
 * @license		http://opensource.org/licenses/gpl-license.php GNU Public License
 */
namespace rpo\http\exception;

use rpo\http\exception\interfaces\AbstractClientException;
use \Exception;

/**
 * This code is similar to 401 (Unauthorized), but indicates that the client must first authenticate
 * itself with the proxy.
 * <p>
 * The proxy MUST return a Proxy-Authenticate header field (section 14.33) containing a challenge applicable
 * to the proxy for the requested resource.
 * The client MAY repeat the request with a suitable Proxy-Authorization header field (section 14.34).
 * HTTP access authentication is explained in "HTTP Authentication: Basic and Digest Access Authentication".
 * </p>
 * @author		João Batista Neto
 * @package		http
 * @final
 * @subpackage	exception
 * @category	Http
 * @license		http://opensource.org/licenses/gpl-license.php GNU Public License
 * @link		http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.33
 * @link		http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.34
 * @link		http://www.w3.org/Protocols/rfc2616/rfc2616-sec17.html#bib43
 * @see			UnauthorizedException
 */
final class ProxyAuthenticationRequiredException extends AbstractClientException {
	/**
	 * Constroi o objeto da exceção
	 * @param string $message A exceção
	 * @param Exception $parent
	 */
	public function __construct( $message , Exception $previous = null ){
		parent::__construct( $message , 407 , $previous );
	}
}